package com.huike.web.controller.report;


import com.huike.common.core.domain.AjaxResult;
import com.huike.report.domain.vo.SalesStatisticVo;
import com.huike.report.domain.vo.VulnerabilityMapVo;
import com.huike.report.service.IIndexService;
import com.huike.report.service.IReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/index")
public class IndexController {
    @Autowired
    private IIndexService indexService;

    @GetMapping("/salesStatistic")
    public AjaxResult getVulnerabilityMap(String beginCreateTime, String endCreateTime, String deptId) {
        //根据创建时间查询数据封装到自定义对象里
        List<SalesStatisticVo> list = indexService.selectGetVulnerabilityMap(beginCreateTime, endCreateTime);
        return new AjaxResult(200, "操作成功", list);
    }

}
